<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        function test()
        {
            var arr1=new Array("1","2","3")
            var arr2=[1,2,3]
            //定义数组的两种方法
            console.log(arr1[0])
            for(var i=0;i<arr1.length;i++)
            {
                console.log(arr1[i])
            }
        }
    </script>
</body>
</html>